<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 输入圆的半径计算面积和周长
    var r = prompt('请输入半径');
    var π = 314;
    var perimeter = parseInt(2 * r * π) / 100;
    var area = parseInt(r * r * π) / 100;
    document.write('圆的周长为：' + perimeter + '圆的面积为：' + area);
  </script>
</body>

</html>